<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>申请退货</title>
		<jsp:include page="/page/jsp/member/head.jsp" />
		<link href="<%=basePath %>style/base.css" type="text/css" rel="stylesheet" />
		<link href="<%=basePath %>style/shopping-cart.css" type="text/css" rel="stylesheet" /><!-- 购物车样式 -->
		<script type="text/javascript">
			
			/* 申请退货,不支持批量申请 */
			function returnProduct(orderDetailId){
				var submit = function (v, h, f) {
					if(v == 'ok'){
						if(orderDetailId!=null){
							//跳转到退货处理页面
							window.location = path+"/member/returnProductInit.htm?orderDetailId="+orderDetailId;
						}
					}
				};
				$.jBox.confirm("确定要退货吗？", "提示", submit)
			}
			
			
		function continueShop(){
			parent.window.location = path;
		}
		
		//管理订单跳转
		function address(){
			window.location = path+"/member/myOrderURL.htm";
		}
	</script>
	</head>
<body>
	<div class="right2">
	<h1><b>我的订单</b></h1>
		<div class="ri_main2">
			<ol class="flow-steps">
				<li class="s1 suc">确认订单信息</li>
				<li class="s2 suc">成功提交订单</li>
				<li class="s3 cur">申请退货</li>
			</ol>
			<div class="returns-info">
				<table class="returns-list">
					<c:forEach var="orderDetails" items="${orderDetails}">
						<tr class="order-hd">
							<td colspan="7"><span>订单编号：${order.orderNo}</span> <span>成交时间：${order.concludeTime}</span></td>
						</tr>
						<tr>
							<td><a href="<%=basePath%>${orderDetails.entityUrl}" target="_blank"><img src="${img_server_url}/${orderDetails.entityImg}" width="70" height="70"/></a></td>
							<td class="commodity">
								<a href="<%=basePath%>${orderDetails.entityUrl}" target="_blank">${orderDetails.entityName}</a>
								<!-- <span class="pro-key">颜色分类：灰色 尺码：M</span> -->
							</td>
							<td>${orderDetails.price}</td>
							<td>${order.fare}</td>
							<td class="operate">
								<a href="javascript:void(0);" class="ret-act" onclick="returnProduct(${orderDetails.id})">申请退货</a>
								<%-- <span><input type="checkbox" name="checkbox" id="checkbox" value="${orderDetails.entityId}" /></span> --%>
							</td>
						</tr>
					</c:forEach>
					<!-- <tr align="right">
						<td colspan="5">
							<label><input type="checkbox" name="checkbox" id="batch-returns" class="batch-returns" />全选</label>&nbsp;<a href="#" target="_blank" class="combine-ret">批量退货</a>
						</td>
					</tr> -->
				</table>
				
				<div class="order-suc-act">
					<a href="javascript:void(0);" onclick="address()">管理我的订单</a>
					<a href="javascript:continueShop()">返回首页继续兑换物品</a>
				</div>
			</div>
		</div>
	</div>
</body>
</html>